<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html{
      font-size: 10px;
    }
    .box{
      width: 10rem;
      height: 10rem;
      background-color: #000;
    }
    @media screen and (max-width: 350px) {
      html{
        font-size: 9px;
      }
    }
  </style>
</head>
<body>
  <div class="box"></div>
</body>
</html>